package com.aqiang.day0528_shop.main.model

import com.aqiang.day0528_shop.main.api.MainApi
import com.aqiang.day0528_shop.main.contract.AreaContract
import com.aqiang.day0528_shop.main.entity.AreaEntity
import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.lib_core.net.RetrofitManage
import kotlinx.coroutines.Deferred

class AreaModel : AreaContract.AreaModel {
    override fun getArea2(id: Int): Deferred<BaseEntity<List<AreaEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getArea(id)
    }

    override fun getArea1(id: Int): Deferred<BaseEntity<List<AreaEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getArea(id)
    }

    override fun getArea(id: Int): Deferred<BaseEntity<List<AreaEntity>>> {
        return RetrofitManage.create(MainApi::class.java).getArea(id)
    }
}